home *** CD-ROM | disk | FTP | other *** search
- Path: news1.h1.usa.pipeline.com!usenet
- From: grantp@usa.pipeline.com(Pete)
- Newsgroups: comp.lang.c++
- Subject: Re: Need help with strings
- Date: 25 Feb 1996 10:56:43 GMT
- Organization: Kalevi, Inc.
- Message-ID: <4gpf9b$r7g@news1.usa.pipeline.com>
- References: <312fa506.21210161@news.ucla.edu>
- NNTP-Posting-Host: pipe14.h1.usa.pipeline.com
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete)
- X-Newsreader: Pipeline USA v3.3.0
-
- On Feb 24, 1996 23:55:08 in article <Re: Need help with strings>,
- 'philhong@ucla.edu (Phil Hong)' wrote:
-
-
- >OK, I just figured out what I did. I had a constructor which was
- >setting all the pointers to equal 0. I thought that this would
- >initialize them to point to null but apparently it won't let me assign
- >anything to the variable later.
-
- Phil: I'm afraid you've figured it wrong -- or you're not saying what
- you mean -- or I misunderstand.
-
- First, initializing pointers to 0 does make them to point to what
- most programmers consider NULL.
-
- Second, initializing variables to anything, including 0, does not
- preclude you from assigning to those variables later. It does,
- however, mean that you can't strcpy to/from those variables
- until they have been rebound to point to some valid memory
- block. But that's different.
-
- --
- Pete Grant
- Kalevi, Inc.
- Software Engineering & development
-